CONFIG -= qt

TEMPLATE = lib
CONFIG += staticlib

CONFIG += c++14

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
DEFINES += __STDC_FORMAT_MACROS
HOME_BASE=../
INCLUDEPATH += $$HOME_BASE/include
INCLUDEPATH += $$HOME_BASE/thirdparty/include
INCLUDEPATH += $$HOME_BASE/thirdparty/user_include
INCLUDEPATH += $$HOME_BASE/thirdparty/user_include/ffmpeg
INCLUDEPATH += $$HOME_BASE/libbperrtc/src

unix{
  CONFIG(debug, debug|release) {
        DESTDIR += $$HOME_BASE/bin/lib_debug
    }else{

        DESTDIR += $$HOME_BASE/bin/lib_release
    }

}
win32{
    DEFINES += _AMD64_
    INCLUDEPATH += $$HOME_BASE\thirdparty\include\win
  CONFIG(debug, debug|release) {
        DESTDIR += $$HOME_BASE\bin\lib_win_debug
    }else{
        DESTDIR += $$HOME_BASE\bin\lib_win_release
    }

    msvc{
        QMAKE_CFLAGS += /utf-8
        QMAKE_CXXFLAGS += /utf-8
       # QMAKE_CXXFLAGS += /source-charset:utf-8 /execution-charset:utf-8
        DEFINES +=HAVE_STRUCT_TIMESPEC
        DEFINES +=WIN32_LEAN_AND_MEAN
        INCLUDEPATH += $$HOME_BASE\thirdparty\include\win\include
    }

}
# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    src/bperaudiodev/BPerAudioCapture.cpp \
    src/bperaudiodev/BPerAudioCaptureData.cpp \
    src/bperaudiodev/BPerAudioCaptureHandle.cpp \
    src/bperaudiodev/BPerAudioPlay.cpp \
    src/bperaudiodev/BPerAudioRenderData.cpp \
    src/bperaudiodev/linux/BPerAudioAecLinux.cpp \
    src/bperaudiodev/linux/BPerAudioCaptureLinux.cpp \
    src/bperaudiodev/linux/BPerAudioPlayLinux.cpp \
    src/bperaudiodev/mac/BPerAudioCaptureMac.cpp \
    src/bperaudiodev/mac/BPerAudioDeviceMac.cpp \
    src/bperaudiodev/mac/BPerAudioMac.cpp \
    src/bperaudiodev/mac/BPerAudioPlayMac.cpp \
    src/bperaudiodev/win/BPerAudioCaptureWindows.cpp \
    src/bperaudiodev/win/BPerRecAudioCaptureHandle.cpp \
    src/bperaudiodev/win/BPerWinAudioApi.cpp \
    src/bperaudiodev/win/BPerWinAudioApiAec.cpp \
    src/bperaudiodev/win/BPerWinAudioApiCapture.cpp \
    src/bperaudiodev/win/BPerWinAudioApiDevice.cpp \
    src/bperaudiodev/win/BPerWinAudioApiRender.cpp \
    src/bperaudiodev/win/BPerWinAudioCapture.cpp \
    src/bperaudiodev/win/BPerWinAudioCaptureHandle.cpp \
    src/bperavutil/BPerMakeWave.cpp \
    src/bperavutil/BPerVideoEncoderMeta.cpp \
    src/bperavutil/BPerYuvConvert.cpp \
    src/bpercapture/BPerCaptureFactory.cpp \
    src/bpercapture/BPerScreenShare.cpp \
    src/bpercapture/BPerVideoCapture.cpp \
    src/bpercapture/BPerVideoCaptureHandle.cpp \
    src/bpercapture/android/BPerCameraAndroid.cpp \
    src/bpercapture/android/BPerVideoCaptureAndroid.cpp \
    src/bpercapture/linux/BPerVideoCaptureLinux.cpp \
    src/bpercapture/win/BPerDXGIManager.cpp \
    src/bpercapture/win/BPerVideoCaptureWindows.cpp \
    src/bpercapture/win/BPerWinVideoCaptureHandle.cpp \
    src/bperdecoder/BPerAudioDecoder.cpp \
    src/bperdecoder/BPerAudioDecoderHandle.cpp \
    src/bperdecoder/BPerAudioDecoderHandles.cpp \
    src/bperdecoder/BPerAudioDecoderOpus.cpp \
    src/bperdecoder/BPerDecoderFactory.cpp \
    src/bperdecoder/BPerDecoderH264.cpp \
    src/bperdecoder/BPerDecoderLibde265.cpp \
    src/bperdecoder/BPerDecoderMediacodec.cpp \
    src/bperdecoder/BPerDecoderOpenh264.cpp \
    src/bperdecoder/BPerH264DecoderSoft.cpp \
    src/bperdecoder/BPerH264DecoderSoft2.cpp \
    src/bperdecoder/BPerVideoDecoderHandle.cpp \
    src/bperdecoder/BPerVideoDecoderHandles.cpp \
    src/bperdecoder/pc/BPerAudioDecoderAac.cpp \
    src/bperdecoder/pc/BPerAudioDecoderSpeex.cpp \
    src/bperdecoder/pc/BPerHeaderParseFfmpeg.cpp \
    src/bperdecoder/pc/BPerVideoDecoderFfmpeg.cpp \
    src/bperencoder/BPerAudioEncoder.cpp \
    src/bperencoder/BPerAudioEncoderAac.cpp \
    src/bperencoder/BPerAudioEncoderHandle.cpp \
    src/bperencoder/BPerAudioEncoderHandleCb.cpp \
    src/bperencoder/BPerAudioEncoderMeta.cpp \
    src/bperencoder/BPerAudioEncoderMp3.cpp \
    src/bperencoder/BPerAudioEncoderOpus.cpp \
    src/bperencoder/BPerAudioEncoderSpeex.cpp \
    src/bperencoder/BPerEncoderFactory.cpp \
    src/bperencoder/BPerEncoderMediacodec.cpp \
    src/bperencoder/BPerFfmpegEncoderMeta.cpp \
    src/bperencoder/BPerH264EncoderMeta.cpp \
    src/bperencoder/BPerH264EncoderSoft.cpp \
    src/bperencoder/BPerH265EncoderMeta.cpp \
    src/bperencoder/BPerH265EncoderSoft.cpp \
    src/bperencoder/BPerOpenH264Encoder.cpp \
    src/bperencoder/BPerVideoEncoder.cpp \
    src/bperencoder/BPerVideoEncoderFfmpeg.cpp \
    src/bperencoder/BPerVideoEncoderHandle.cpp \
    src/bperrtc/BPerPeerConnection2.cpp \
    src/bperstream/BPerStreamManager.cpp \
    src/bperstream/BPerSynBuffer.cpp \
    src/bperstream/BPerSynBufferManager.cpp \
    src/bperutil/BPerAvinfo.cpp \
    src/bperutil/BPerLoadLib.cpp \
    src/bperutil/BPerString.cpp \
    src/bperutil/BPerSysMessageHandle.cpp \
    src/bperutil/BPerThread.cpp \
    src/bperutil/BPerTimer.cpp \
    src/bperutil/buffer/BPerAudioBuffer.cpp \
    src/bperutil/buffer/BPerAudioEncoderBuffer.cpp \
    src/bperutil/buffer/BPerAudioPlayBuffer.cpp \
    src/bperutil/buffer/BPerMediaBuffer.cpp \
    src/bperutil/buffer/BPerVideoBuffer.cpp \
    src/bperutil/buffer/BPerVideoDecoderBuffer.cpp \
    src/bperutil/buffer/BPerVideoEncoderBuffer.cpp\
    src/bpercapture/mac/BPerVideoCaptureMac.cpp \

macx{
    SOURCES += src/bpercapture/mac/BPerVideoDeviceMac.mm
}


HEADERS += \
    src/bperaudiodev/BPerAudioCaptureHandle.h \
    src/bperaudiodev/BPerCaptureCallback.h \
    src/bperaudiodev/linux/BPerAudioAecLinux.h \
    src/bperaudiodev/linux/BPerAudioCaptureLinux.h \
    src/bperaudiodev/linux/BPerAudioPlayLinux.h \
    src/bperaudiodev/mac/BPerAudioCaptureMac.h \
    src/bperaudiodev/mac/BPerAudioMac.h \
    src/bperaudiodev/mac/BPerAudioPlayMac.h \
    src/bperaudiodev/win/BPerAudioApiCapture.h \
    src/bperaudiodev/win/BPerAudioCaptureWindows.h \
    src/bperaudiodev/win/BPerRecAudioCaptureHandle.h \
    src/bperaudiodev/win/BPerWinAudioApi.h \
    src/bperaudiodev/win/BPerWinAudioApiAec.h \
    src/bperaudiodev/win/BPerWinAudioApiCapture.h \
    src/bperaudiodev/win/BPerWinAudioApiDevice.h \
    src/bperaudiodev/win/BPerWinAudioApiRender.h \
    src/bperaudiodev/win/BPerWinAudioCapture.h \
    src/bperaudiodev/win/BPerWinAudioCaptureHandle.h \
    src/bperaudiodev/win/BPerWinAudioDevice.h \
    src/bpercapture/BPerScreenCaptureImpl.h \
    src/bpercapture/BPerScreenShare.h \
    src/bpercapture/BPerVideoCaptureHandle.h \
    src/bpercapture/android/BPerCameraAndroid.h \
    src/bpercapture/android/BPerVideoCaptureAndroid.h \
    src/bpercapture/linux/BPerVideoCaptureLinux.h \
    src/bpercapture/mac/BPerVideoCaptureMac.h \
    src/bpercapture/mac/BPerVideoDeviceMac.h \
    src/bpercapture/win/BPerDXGIManager.h \
    src/bpercapture/win/BPerVideoCaptureWindows.h \
    src/bpercapture/win/BPerVideoSrc.h \
    src/bpercapture/win/BPerWinVideoCaptureHandle.h \
    src/bperdecoder/BPerAudioDecoderOpus.h \
    src/bperdecoder/BPerDecoderH264.h \
    src/bperdecoder/BPerDecoderLibde265.h \
    src/bperdecoder/BPerDecoderMediacodec.h \
    src/bperdecoder/BPerDecoderOpenh264.h \
    src/bperdecoder/BPerH264Dec.h \
    src/bperdecoder/BPerH264DecoderSoft.h \
    src/bperdecoder/BPerH264DecoderSoft2.h \
    src/bperdecoder/BPerH264DecoderSoftFactory.h \
    src/bperdecoder/pc/BPerAudioDecoderAac.h \
    src/bperdecoder/pc/BPerAudioDecoderSpeex.h \
    src/bperdecoder/pc/BPerHeaderParseFfmpeg.h \
    src/bperdecoder/pc/BPerVideoDecoderFfmpeg.h \
    src/bperencoder/BPerAudioEncoderAac.h \
    src/bperencoder/BPerAudioEncoderMp3.h \
    src/bperencoder/BPerAudioEncoderOpus.h \
    src/bperencoder/BPerAudioEncoderSpeex.h \
    src/bperencoder/BPerEncoderMediacodec.h \
    src/bperencoder/BPerFfmpegEncoderMeta.h \
    src/bperencoder/BPerH264EncHeader.h \
    src/bperencoder/BPerH264EncoderMeta.h \
    src/bperencoder/BPerH264EncoderSoft.h \
    src/bperencoder/BPerH265EncoderMeta.h \
    src/bperencoder/BPerH265EncoderSoft.h \
    src/bperencoder/BPerOpenH264Encoder.h \
    src/bperencoder/BPerVideoEncoderFfmpeg.h \
    src/bperencoder/lame.h

# Default rules for deployment.
unix {
    target.path = $$[QT_INSTALL_PLUGINS]/generic
}
!isEmpty(target.path): INSTALLS += target
